{template 'common/header'}
	<ul class="nav nav-tabs">
		<li class="active">
			<a href="#" >二手交易管理</a>
		</li>
		
	</ul>
	<div style="padding:15px;">
		<table class="table table-hover table-striped">
			<thead class="navbar-inner">
				<tr>
					<th class="col-sm-1">编号</th>
					<th class="col-sm-2">商品名称</th>
					<th class="col-sm-1">价格</th>
					<th class="col-sm-1">联系人</th>
					<th class="col-sm-2">联系电话</th>
					<th class="col-sm-2">发布时间</th>
					<th class="col-sm-4">操作</th>
				</tr>
			</thead>
			<tbody>
				{loop $list $good}
				<tr>
					<td>{$good['id']}</td>
					<td>{$good['title']}</td>
					<td>{$good['zprice']}元</td>
					<td>{$good['realname']}</td>
					<td>{$good['mobile']}</td>
					<td>{php echo date('Y-m-d',$good['createtime'])}</td>
					<td>
						<a href="{php echo $this->createWebUrl('fled',array('op' => 'detail','id'=>$good['id']))}" class="text-success m-r"><i class="glyphicon glyphicon-search"></i>查看
						</a>&nbsp;
						<a href="javascript:;" onclick="delete_info('{$good['id']}')" title="删除" class="text-danger m-r">	<i class="fa fa-times"></i>删除
						</a>&nbsp;
						<a onclick="toblack('{$good['id']}')" href="#" ><i class="fa fa-eye-slash"></i>信息加入黑名单</a>
					</td>
				</tr>
				{/loop}
			</tbody>
		</table>
	</div>
	{$pager}
	<script type="text/javascript">
	    function delete_info(id){
	        $.getJSON("{php echo $this->createWebUrl('fled')}", {"op":"delete","id":id}, function(msg){
	        	var _obj = JSON.parse(msg);
	            if(_obj.state==1){
	                location.reload();
	            }
	        });
    	}
    	function toblack(id){
	    	var id = id;
	            if(!id) return false;
	            $.post("{php echo $this->createWebUrl('fled')}", {"op":"toblack","id":id}, function(msg){
	                var _obj = JSON.parse(msg);
	                if(_obj.state==1){
	                   location.reload();
	                }
	            });
	    }
	</script>
{template 'common/footer'}